/*
 * BuildUnitCommand.h
 *
 *  Created on: Oct 14, 2008
 *      Author: Ryan
 */

#ifndef BUILDUNITCOMMAND_H_
#define BUILDUNITCOMMAND_H_

#include "Command.h"
#include "../Units/Unit.h"

namespace OOInterface
{

/**
 * The BuildUnitCommand is intended to be sent to structures that produce units.
 * This command requests that the structure attempt to construct the unit specified.
 */
class BuildUnitCommand: public OOInterface::Command
{
public:

	/**
	 * BuildUnitCommand( ... ) :
	 * Constructs a BuildUnitCommand specifying that /unit/ be built.
	 *
	 * @param unit The unit that should be built.
	 */
	BuildUnitCommand( ConstUnitPtr unit): _unit( unit ) {}
	virtual ~BuildUnitCommand() {}

	ConstUnitPtr getUnit() const { return _unit; }
	void setUnit( ConstUnitPtr unit ) { _unit = unit; }

	virtual std::string toString() const { return std::string("BuildUnitCommand"); }

private:
	ConstUnitPtr _unit;
};

}

#endif /* BUILDUNITCOMMAND_H_ */
